#!/bin/sh
./redis-cli -c -p 7001 -h 10.12.12.140 -a abc cluster nodes | awk '{if($3=="master" || $3=="myself,master") print $2}' | awk -v var_pattern="$1" -F[:@] '{system("./redis-cli -c -a abc -p "$2" -h "$1" keys MI* ")}'


./redis-cli --cluster create -a 10.1.3.78:7006 10.1.3.78:7007 10.1.3.78:7008 10.1.3.78:7009 10.1.3.78:7010 10.1.3.78:7011 --cluster-replicas 1
